/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package ejercicio.practica1;

import static java.lang.Math.random;

/**
 *
 * @author manolo
 */
public class aleatorios {

    public static void main(String[] args) {

        try {
            int n = Integer.valueOf(args[0]);

            for (int i = 0; i < n; i++) {
                System.out.println(random());
            }
        } catch (NumberFormatException e) {            
            System.out.println("Se ha producido el siguiente error " + e + ", por no haber introducido un numero.");
            System.out.println("Se toman por defecto 10 iteraciones");
            for (int i = 0; i < 10; i++) {
                System.out.println(random());
            }
        }
    }
}
